//
//  PingLunwCell.m
//  ShopDemo
//
//  Created by 飞扬的青春 on 2018/7/31.
//  Copyright © 2018年 飞扬的青春. All rights reserved.
//

#import "PingLunwCell.h"

@implementation PingLunwCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIView *backvie = [UIView new];
        backvie.layer.masksToBounds = YES;
        backvie.layer.cornerRadius = 5*kJLXWidthScale;
        backvie.layer.borderColor = [UIColor orangeColor].CGColor;
        backvie.layer.borderWidth = 1;
        [self.contentView addSubview:backvie];
        backvie.sd_layout
        .topSpaceToView(self.contentView, 8*kJLXWidthScale)
        .leftSpaceToView(self.contentView, 5*kJLXWidthScale)
        .bottomSpaceToView(self.contentView, 5*kJLXWidthScale)
        .rightSpaceToView(self.contentView,8*kJLXWidthScale);
        
        UIImageView *titimagevi = [UIImageView new];
        self.titimagevi = titimagevi;
        titimagevi.backgroundColor = [UIColor whiteColor];
        [backvie addSubview:titimagevi];
        titimagevi.sd_layout
        .topSpaceToView(backvie, 8*kJLXWidthScale)
        .leftSpaceToView(backvie, 8*kJLXWidthScale)
        .heightIs(25*kJLXWidthScale)
        .widthIs(25*kJLXWidthScale);
        
        UILabel *datelab = [UILabel new];
        self.datelab = datelab;
        datelab.textAlignment = NSTextAlignmentRight;
        datelab.font = [UIFont systemFontOfSize:13*kJLXWidthScale];
        datelab.textColor = LineColor;
        [backvie addSubview:datelab];
        datelab.sd_layout
        .topSpaceToView(backvie, 8*kJLXWidthScale)
        .rightSpaceToView(backvie, 8*kJLXWidthScale)
        .heightIs(30*kJLXWidthScale)
        .widthIs(150*kJLXWidthScale);
        
        
        UILabel *onelab = [UILabel new];
        self.titlab = onelab;
        onelab.font = [UIFont systemFontOfSize:17*kJLXWidthScale];
        onelab.textColor = [UIColor darkGrayColor];
        [backvie addSubview:onelab];
        onelab.sd_layout
        .centerYEqualToView(titimagevi)
        .leftSpaceToView(titimagevi, 5*kJLXWidthScale)
        .heightIs(30*kJLXWidthScale)
        .rightSpaceToView(datelab, 0);
        
        UILabel *contentlab = [UILabel new];
        self.contentlab = contentlab;
        contentlab.numberOfLines = 0;
        contentlab.font = [UIFont systemFontOfSize:16*kJLXWidthScale];
        [backvie addSubview:contentlab];
        contentlab.sd_layout
        .topSpaceToView(onelab, 0)
        .leftSpaceToView(backvie, 8*kJLXWidthScale)
        .rightSpaceToView(backvie, 8*kJLXWidthScale)
        .heightIs(50*kJLXWidthScale);
    }
    return self;
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
